home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / utils1 / fip09.arj / SOURCE.ZIP / FIPSSPEC.H < prev    next >
C/C++ Source or Header  |  1993-11-17  |  3KB  |  97 lines

  1. /*
  2.     FIPS - the First nondestructive Interactive Partition Splitting program
  3.  
  4.     Module fipsspec.h
  5.  
  6.     RCS - Header:
  7.     $Header: c:/daten/c/fips/source/cpp/RCS/fipsspec.h 0.9.1.1 1993/11/17 17:52:30 schaefer Exp schaefer $
  8.  
  9.     Copyright (C) 1993 Arno Schaefer
  10.  
  11.     This program is free software; you can redistribute it and/or modify
  12.     it under the terms of the GNU General Public License as published by
  13.     the Free Software Foundation; either version 2 of the License, or
  14.     (at your option) any later version.
  15.  
  16.     This program is distributed in the hope that it will be useful,
  17.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.     GNU General Public License for more details.
  20.  
  21.     You should have received a copy of the GNU General Public License
  22.     along with this program; if not, write to the Free Software
  23.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24.  
  25.  
  26.     Report problems and direct all questions to:
  27.  
  28.     schaefer@rbg.informatik.th-darmstadt.de
  29. */
  30.  
  31. #ifndef FIPSSPEC_H
  32. #define FIPSSPEC_H
  33.  
  34. #include "logdr_st.h"
  35. #include "hdstruct.h"
  36.  
  37. class fips_bpb:public bios_parameter_block
  38. {
  39. public:
  40.     void print (void);
  41.     void calculate_new_boot (const partition_info &partition_info);
  42. };
  43.  
  44. class fips_partition_table:public partition_table
  45. {
  46. public:
  47.     void print (void);
  48.     void calculate_new_root (dword new_start_cylinder,int partition_number,const drive_geometry &geometry);
  49. };
  50.  
  51. class fips_harddrive:public harddrive
  52. {
  53.     fips_partition_table pr_partition_table;
  54. protected:
  55.     void get_geometry (void);
  56. public:
  57.     void reset (void);
  58.     class partition_table &partition_table() { return pr_partition_table; }
  59.     void print_partition_table (void) { pr_partition_table.print(); }
  60.     void calculate_new_root (dword new_start_cylinder,int partition_number)
  61.     {
  62.         pr_partition_table.calculate_new_root (new_start_cylinder,partition_number,geometry);
  63.     }
  64.     void check (void);
  65.  
  66.     fips_harddrive (int number):harddrive (number) { get_geometry(); }  // to write register info to debugfile
  67.     fips_harddrive (fips_harddrive &hd):harddrive (hd) {}
  68.     void operator= (fips_harddrive &hd) { harddrive::operator= (hd); }
  69. };
  70.  
  71. class fips_logdrive_info:public logical_drive_info
  72. {
  73. public:
  74.     void put_debug_info (void);
  75. };
  76.  
  77. class fips_partition:public partition
  78. {
  79.     fips_bpb pr_bpb;
  80.     fips_logdrive_info pr_info;
  81. public:
  82.     bios_parameter_block &bpb() { return pr_bpb; }
  83.     logical_drive_info &info() { return pr_info; }
  84.  
  85.     void print_bpb (void) { pr_bpb.print(); }
  86.     void write_info_debugfile (void) { pr_info.put_debug_info(); }
  87.     void calculate_new_boot (void)
  88.     {
  89.         pr_bpb.calculate_new_boot (*partition_info);
  90.     }
  91.     void check (void);
  92.  
  93.     fips_partition (class fips_harddrive *drive,int number):partition(drive,number) {}
  94. };
  95.  
  96. #endif
  97.